<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
//用户账户表
class Users_log_model extends CI_Model{
    function __construct() {
        parent::__construct();
        $this->table = 'users_log';
    }
    function insert($data){
        $data['create_date'] = date('Ym',$data['create_time']);
        $data['create_day'] = date('Ymd',$data['create_time']);
        $this->db->insert($this->table, $data);
        if($this->db->affected_rows()){
            return $this->db->insert_id();
        }else{
            return 0;
        }
    }
    
}
